add printk-like timecode in front of TRACE msgs
to help correlate order between dmesg messages and TRACE msgs
which are held in different log files


diff --git a/libxfce4util/xfce-debug.h b/libxfce4util/xfce-debug.h
index 60f7284..1b4f628 100644
--- a/libxfce4util/xfce-debug.h
+++ b/libxfce4util/xfce-debug.h
@@ -64,10 +64,26 @@
 
 #if defined(DEBUG_TRACE) && (DEBUG_TRACE > 0)
 
+#include <sys/sysinfo.h>
+static long trace_get_uptime()
+{ //src: https://stackoverflow.com/questions/1540627/what-api-do-i-call-to-get-the-system-uptime
+  struct sysinfo s_info;
+  int error;
+  error = sysinfo(&s_info);
+  if(error != 0)
+  {
+    fprintf(stderr, "Error %d getting uptime.\n", error);
+    return -error;
+  }
+  return s_info.uptime;//long uptime; //%ld            /* Seconds since boot */
+//printk dmesg style aka uptime
+}
+
+
 #if defined(G_HAVE_ISO_VARARGS)
 
 #define TRACE(...)              G_STMT_START{                               \
-    fprintf(stderr, "TRACE[%s:%d] %s(): ",__FILE__,__LINE__,__DBG_FUNC__);  \
+    fprintf(stderr, "[%8ld]TRACE[%s:%d] %s(): ",trace_get_uptime(),__FILE__,__LINE__,__DBG_FUNC__);  \
     fprintf(stderr, __VA_ARGS__);                                           \
     fprintf(stderr, "\n");                                                  \
 }G_STMT_END
@@ -76,7 +92,7 @@
 
 #define TRACE(fmt, args...)     G_STMT_START{                               \
 {                                                                           \
-    fprintf(stderr, "TRACE[%s:%d] %s(): ",__FILE__,__LINE__,__DBG_FUNC__);  \
+    fprintf(stderr, "[%8d]TRACE[%s:%d] %s(): ",trace_get_uptime(),__FILE__,__LINE__,__DBG_FUNC__);  \
     fprintf(stderr, fmt, ##args);                                           \
     fprintf(stderr, "\n");                                                  \
 }G_STMT_END
